package com.ctrip.corp.obt.shard.configuration;

import com.ctrip.corp.obt.generic.utils.EnvironmentHolder;

public final class Config {

    private static final String PREFIX = "arch.shard.";

    private static final SecurityFuzzyQueryConfig DEFAULT_CONFIG = k -> EnvironmentHolder.getProperty(PREFIX + k);
    private static final StoreDatabaseDDLConfig STORE_DATABASE_DDL_CONFIG = k -> EnvironmentHolder.getProperty(PREFIX + k);

    private Config() {
    }

    /**
     * Returns a default implementation of the registry config backed by system properties.
     */
    public static SecurityFuzzyQueryConfig defaultConfig() {
        return DEFAULT_CONFIG;
    }

    public static StoreDatabaseDDLConfig storeDatabaseDDL() {
        return STORE_DATABASE_DDL_CONFIG;
    }
}
